class Medikit:
    name = ""

    def __init__(self, name):
        self.name = name

    def printInfo(self):
        print("医疗包:" + self.name)


class Helmet:
    name = ""
    point = 0

    def __init__(self, name, point):
        self.name = name
        self.point = point

    def printInfo(self):
        print("头盔:" + self.name + "\t\t" + "剩余防护力：" + str(self.point))


class Transform:
    name = ""
    speed = 0
    times = 1

    def __init__(self, name, speed, times):
        self.name = name
        self.speed = speed
        self.times = times

    def printInfo(self):
        print("交通:" + self.name + "\t\t" + "速度：" + str(self.speed) + "\t\t" + "剩余次数：" + str(self.times))


class Weapon:
    name = ""
    attack = 0
    times = 1

    def __init__(self, name, attack, times):
        self.name = name
        self.attack = attack
        self.times = times

    def printInfo(self):
        print("武器:" + self.name + "\t\t" + "攻击力：" + str(self.attack) + "\t\t" + "攻击次数：" + str(self.times))


class Player:
    name = ""
    blood = 100
    level = "青铜"
    weapon = Weapon("手", 1, -1)
    transform = Transform("脚", 1, -1)
    helmet = Helmet("头发", 100)
    medikit = Medikit("无")

    def __init__(self, name):
        self.name = name

    def printInfo(self):
        print("名字:" + self.name + "\t\t" + "血量：" + str(self.blood) + "\t\t" + "等级：" + self.level)
        self.weapon.printInfo()
        self.transform.printInfo()
        self.helmet.printInfo()
        self.medikit.printInfo()


print("===本游戏由听安工作室出品===")
print("抵制不良游戏 拒绝盗版游戏")
print("注意自我保护 谨防受骗上当")
print("适度游戏益脑 沉迷游戏伤身")
print("合理安排时间 享受健康生活")
print("=" * 80)
username = input("你的名字：")
print("=" * 80)
player = Player(username)
player.printInfo()
print("=" * 80)
print("准备跳伞，请选择跳伞位置")
while True:
    choice = input("1.老6城(800km), 2.P城(500km), 3.G港(300km), 4.新春园林(100km)  请输入:")
    if choice.isdigit():
        num = int(choice)
    else:
        num = -1
    if num == 1:
        print("成功降落老6城(800km)")
        break
    elif num == 2:
        print("成功降落P城(500km)")
        break
    elif num == 3:
        print("成功降落G港(300km)")
        break
    elif num == 4:
        print("成功降落新春园林(100km)")
        break
    else:
        print("无效输入请重新输入")
        continue
